﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class MemberOpenIdInfoConfig : EntityTypeConfiguration<MemberOpenIdInfo>
    {
        public MemberOpenIdInfoConfig()
        {
            ToTable("Himall_MemberOpenIds");
            Property(item => item.OpenId).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.ServiceProvider).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.UnionId).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.UnionOpenId).HasColumnType("varchar").HasMaxLength(100);
            HasRequired(x => x.MemberInfo).WithMany(x => x.MemberOpenIdInfo).HasForeignKey(x => x.UserId);
        }
    }
}
